package com.mbc.mapper;


import com.mbc.dto.RoughAnimalInfoDTO;
import com.mbc.vo.DetailsAnimalInfoVO;
import com.mbc.vo.RoughAnimalInfoVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;
import java.util.ArrayList;

/**
 * <p>
 * 用户发布流浪动物表 Mapper 接口
 * </p>
 *
 * @author suimeng
 * @since 2024-04-15
 */
@Mapper
public interface UserPublishedAnimalMapper {

    /**
     * 获取粗糙动物信息
     *
     * @param roughAnimalInfoDTO 粗糙动物信息 DTO
     * @param now                现在
     * @return {@link ArrayList }<{@link RoughAnimalInfoVO }>
     */
    ArrayList<RoughAnimalInfoVO> getByRoughAnimalInfo(RoughAnimalInfoDTO roughAnimalInfoDTO, LocalDateTime now);

    /**
     * 查询详细信息动物信息
     *
     * @param animalId 动物 ID
     * @return {@link DetailsAnimalInfoVO}
     */
    /*@Select("select a.*,b.*, c.* from mbc_user_published_animal a
        inner join mbc_animal_info b on a.animal_id = b.animal_id
        inner join mbc_sign c on a.sign_id = c.sign_id
        where a.animal_id = #{animalId}")*/
    DetailsAnimalInfoVO getByDetailsAnimalInfo(Integer animalId);


}
